/*
* Copyright (C) 2020 ~ 2024 chaigec All Rights Reserved.
*
* Author:     chaigec <chaigec@163.com>
* Maintainer: chaigec <chaigec@163.com>

 * Use of this source code is governed by MIT license that can be found in the
 * LICENSE file in the root of the source tree. All contributing project authors
 * may be found in the AUTHORS file in the root of the source tree.
*/

#include <MkUtil/MkLog.h>
#include <gtest/gtest.h>
#ifndef _WIN32
#include <sanitizer/asan_interface.h>
#endif
int main(int argc, char *argv[])
{
#ifndef _WIN32
    __sanitizer_set_report_path("asan.log");
    signal(SIGPIPE, SIG_IGN);  //ignore sigpipe
#else
    WSADATA WSAData;
    WSAStartup(0x101, &WSAData);
#endif
    MkLogInitLevel("ut_MkCore", TO_FILE | TO_SCREEN);
    MkLogChangeLevel(LOG_DEBUG);  //ut test not wait log
    testing::InitGoogleTest(&argc, argv);
    int Ret = RUN_ALL_TESTS();
#ifdef _WIN32
    WSACleanup();
#endif
    return 0;
}